<HTML> 
<HEAD> 
	<TITLE>3rd Party ROBOTC Drivers</TITLE> 
<link href="tabs.css" rel="stylesheet" type="text/css"/> 
<link href="doxygen.css" rel="stylesheet" type="text/css"/> 
</HEAD> 
 
<BODY bgcolor="#ffffff" link="#000000" vlink="#000000"> 
<table width="100%" bgcolor="navy" cellspacing=0 cellpadding=1 border=0> 
<tr><td><table width="100%" bgcolor="#EEEEDD" cellspacing=0 cellpadding=3 border=0> 
<tr> 
    <td width="33%" align="left"> <img src="images/LOGO_NXT.gif" width=266 height=44 border="0" alt="Mindstorms"></td> 
    <td><b><font size="+3" color="navy">3rd Party ROBOTC Drivers</font></b></td> 
    <td align="right"> <img src="images/logo.png" width=44 height=44 border="0" alt="RobotC"></td>     
</tr> 
  <tr bgcolor="#cccc99" align="right"> 
          <td colspan=3> <font face="arial" size="-1"> [<a href=main.html>Home</a>] [<a target=_top href="https://sourceforge.net/projects/rdpartyrobotcdr/">Download</a>] [<a target=_top href="http://apps.sourceforge.net/mantisbt/rdpartyrobotcdr/my_view_page.php">Submit a bug/suggestion</a>]  [<a target=_top href="http://www.robotc.net/forums/">ROBOTC Forums</a>] [<a target=_top href="http://botbench.com">Blog</a>] [<a target=_top href="http://sourceforge.net/donate/index.php?group_id=257238">Support this project</a>]</font> </td> 
</tr> 
</table></td></tr> 
</table> 
<!-- Generated by Doxygen 1.7.2 -->
<div class="header">
  <div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<h1>hitechnic-colour-v2.h File Reference</h1>  </div>
</div>
<div class="contents">

<p>HiTechnic Color Sensor V2 driver.  
<a href="#_details">More...</a></p>
<code>#include &quot;<a class="el" href="common_8h_source.html">common.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="common-light_8h_source.html">common-light.h</a>&quot;</code><br/>

<p><a href="hitechnic-colour-v2_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga1ddd6a1524a8a84b7f779f39ff7a3756">HTCS2_I2C_ADDR</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga928a2e2a2ab04d67bc76b2d8127bf634">HTCS2_CMD_REG</a>&#160;&#160;&#160;0x41</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga00a840338732a63e38b564f1f9417888">HTCS2_OFFSET</a>&#160;&#160;&#160;0x42</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga84e62b9b656099ff524baa5f125601ee">HTCS2_COLNUM_REG</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#gacc2e1c48f8066d385fe0b028e404a609">HTCS2_RED_REG</a>&#160;&#160;&#160;0x01</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga2362fb8bd820e05eb082351e7ec890a9">HTCS2_GREEN_REG</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga82830f32588e958a7091aac146b8b7cb">HTCS2_BLUE_REG</a>&#160;&#160;&#160;0x03</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga019be5fd3304eff15595043d8dbb403d">HTCS2_WHITE_REG</a>&#160;&#160;&#160;0x04</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga78e91c2dc314b9bf41b29d1526c9a05a">HTCS2_COL_INDEX_REG</a>&#160;&#160;&#160;0x05</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga56f76d6158ac86d04b2647c7be78d9e0">HTCS2_RED_NORM_REG</a>&#160;&#160;&#160;0x06</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga871960fcc864d240b33a88302f9507aa">HTCS2_GREEN_NORM_REG</a>&#160;&#160;&#160;0x07</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga67edcac35d3ce2223bcf602446bf42dc">HTCS2_BLUE_NORM_REG</a>&#160;&#160;&#160;0x08</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#gaf23754bda35db67bd5c0faa8f32569d7">HTCS2_RED_MSB</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#gac07166241d72083f90ce48644ecd732f">HTCS2_RED_LSB</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#gad7a85e17964f4e5dfa400f8e135fe18b">HTCS2_GREEN_MSB</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga55807efd300f012e50353f9974ce1d9b">HTCS2_GREEN_LSB</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga72ff42ef85313af7ccb1390766f5e837">HTCS2_BLUE_MSB</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga457ef0da582807c30009ad1459c3aa6a">HTCS2_BLUE_LSB</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga744708b9fc7c2ae19df5d85d9ad05c2f">HTCS2_WHITE_MSB</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#gaba20d88c1fdc6f6f487c769e891f6630">HTCS2_WHITE_LSB</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga33fc80d710250c03c2796beee48fa898">HTCS2_MODE_ACTIVE</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#gac09a5c68b443d17994636e0f53a82d04">HTCS2_MODE_PASSIVE</a>&#160;&#160;&#160;0x01</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga9cb7d5be52417d92592748429ba10edf">HTCS2_MODE_RAW</a>&#160;&#160;&#160;0x03</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga50bad58dc078cfbf58eea1098a3fa263">HTCS2_MODE_50HZ</a>&#160;&#160;&#160;0x35</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#gaafb8af326c4b2f9c46b501a2e58ecf36">HTCS2_MODE_60HZ</a>&#160;&#160;&#160;0x36</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga371317dfd73c42a69d00c5c897a73baf">HTCS2readColor</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#gadd2a1a26508fdd590bc51dbb797afa36">HTCS2readRGB</a> (tSensors link, int &amp;red, int &amp;green, int &amp;blue)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga0546469b0cbb0700b2ea42da99285430">HTCS2readHSV</a> (tSensors link, float &amp;hue, float &amp;saturation, float &amp;value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga14464c36212a8509b80249d91c88b516">HTCS2readWhite</a> (tSensors link, int &amp;white)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#gacebfa13989382c197e7a2e32b65a4803">HTCS2readNormRGB</a> (tSensors link, int &amp;red, int &amp;green, int &amp;blue)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga07a4932a35150e579fa160a0cf697428">HTCS2readRawRGB</a> (tSensors link, bool passive, long &amp;red, long &amp;green, long &amp;blue)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga3159d86a12eacd74d371ad5d8b6b1306">HTCS2readRawWhite</a> (tSensors link, bool passive, long &amp;white)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga02b1f9fac37021b4aac9be3d05f49096">_HTCSsendCommand</a> (tSensors link, byte command)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga0a6d5e3dc0460fc2fd2f909655bc671f">HTCS2readColor</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga3ce3872e5c7f93e5651b52d005e7ce65">HTCS2readRGB</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor, int &amp;red, int &amp;green, int &amp;blue)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga407c9f80cae614c789c14b2d52406fe0">HTCS2readHSV</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor, float &amp;hue, float &amp;saturation, float &amp;value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#gaaed25fe072346fb10ba7ab64d35c022b">HTCS2readColorIndex</a> (tSensors link)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__htsmux.html#gae535601c6d1a8544ed23e79d545ce45c">tConfigParams</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga334e8145052f34c11c345a52c574298e">HTCS2_config</a> = {HTSMUX_CHAN_I2C, 4, 0x02, 0x42}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#gafbee77d5bdcffaee6cc461f440e7cd5c">HTCS2_I2CRequest</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga8a52682f10c238f3e34e4f68183c5924">HTCS2_I2CReply</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">signed byte&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs2.html#ga98e9d3b3dc36be3be560a7f6487345b6">active_mode</a> [4] = {-1, -1, -1, -1}</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>HiTechnic Color Sensor V2 driver. </p>
<p>HTCS22-driver.h provides an API for the HiTechnic Color Sensor driver.</p>
<p>Changelog:</p>
<ul>
<li>0.1: Initial release</li>
<li>0.2: Use new calls in <a class="el" href="common_8h.html" title="Commonly used functions used by drivers.">common.h</a> that don't require SPORT/MPORT macros Removed usage of ubyteToInt();</li>
<li>0.3: Replaced array structs with typedefs</li>
<li>0.4: Added <a class="el" href="group__htcs.html#ga27de3044e46a7fc9dda2602617559928">HTCSreadHSV()</a>, thanks Mike Henning, Max Bareiss</li>
</ul>
<p>Credits:</p>
<ul>
<li>Big thanks to HiTechnic for providing me with the hardware necessary to write and test this.</li>
</ul>
<p>License: You may use this code as you wish, provided you give credit where its due.</p>
<p>THIS CODE WILL ONLY WORK WITH ROBOTC VERSION 3.59 AND HIGHER.</p>
<dl class="author"><dt><b>Author:</b></dt><dd>Xander Soldaat (xander_at_botbench.com) </dd></dl>
<dl class="date"><dt><b>Date:</b></dt><dd>27 April 2011 </dd></dl>
<dl class="version"><dt><b>Version:</b></dt><dd>0.4 </dd></dl>

<p>Definition in file <a class="el" href="hitechnic-colour-v2_8h_source.html">hitechnic-colour-v2.h</a>.</p>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Mar 13 2013 19:56:43 for ROBOTC Drivers by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>
